Optimal. Leaf size=53 \[ -\frac {\tanh ^{-1}\left (\frac {\sqrt {a \sec ^2(x)}}{\sqrt {a}}\right )}{a^{3/2}}+\frac {1}{3 \left (a \sec ^2(x)\right )^{3/2}}+\frac {1}{a \sqrt {a \sec ^2(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3738, 4209, 53,
65, 213} \begin {gather*} -\frac {\tanh ^{-1}\left (\frac {\sqrt {a \sec ^2(x)}}{\sqrt {a}}\right )}{a^{3/2}}+\frac {1}{a \sqrt {a \sec ^2(x)}}+\frac {1}{3 \left (a \sec ^2(x)\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 53
Rule 65
Rule 213
Rule 3738
Rule 4209
Rubi steps
\begin {align*} \int \frac {\cot (x)}{\left (a+a \tan ^2(x)\right )^{3/2}} \, dx &=\int \frac {\cot (x)}{\left (a \sec ^2(x)\right )^{3/2}} \, dx\\ &=\frac {1}{2} a \text {Subst}\left (\int \frac {1}{(-1+x) (a x)^{5/2}} \, dx,x,\sec ^2(x)\right )\\ &=\frac {1}{3 \left (a \sec ^2(x)\right )^{3/2}}+\frac {1}{2} \text {Subst}\left (\int \frac {1}{(-1+x) (a x)^{3/2}} \, dx,x,\sec ^2(x)\right )\\ &=\frac {1}{3 \left (a \sec ^2(x)\right )^{3/2}}+\frac {1}{a \sqrt {a \sec ^2(x)}}+\frac {\text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a x}} \, dx,x,\sec ^2(x)\right )}{2 a}\\ &=\frac {1}{3 \left (a \sec ^2(x)\right )^{3/2}}+\frac {1}{a \sqrt {a \sec ^2(x)}}+\frac {\text {Subst}\left (\int \frac {1}{-1+\frac {x^2}{a}} \, dx,x,\sqrt {a \sec ^2(x)}\right )}{a^2}\\ &=-\frac {\tanh ^{-1}\left (\frac {\sqrt {a \sec ^2(x)}}{\sqrt {a}}\right )}{a^{3/2}}+\frac {1}{3 \left (a \sec ^2(x)\right )^{3/2}}+\frac {1}{a \sqrt {a \sec ^2(x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 47, normalized size = 0.89 \begin {gather*} \frac {15+\cos (3 x) \sec (x)+12 \left (-\log \left (\cos \left (\frac {x}{2}\right )\right )+\log \left (\sin \left (\frac {x}{2}\right )\right )\right ) \sec (x)}{12 a \sqrt {a \sec ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 38, normalized size = 0.72
method | result | size |
default | \(\frac {\cos ^{3}\left (x \right )+3 \cos \left (x \right )+3 \ln \left (-\frac {-1+\cos \left (x \right )}{\sin \left (x \right )}\right )+4}{3 \cos \left (x \right )^{3} \left (\frac {a}{\cos \left (x \right )^{2}}\right )^{\frac {3}{2}}}\) | \(38\) |
risch | \(\frac {{\mathrm e}^{4 i x}}{24 a \left ({\mathrm e}^{2 i x}+1\right ) \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}}+\frac {5 \,{\mathrm e}^{2 i x}}{8 a \left ({\mathrm e}^{2 i x}+1\right ) \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}}+\frac {5}{8 \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}+1\right ) a}+\frac {{\mathrm e}^{-2 i x}}{24 a \left ({\mathrm e}^{2 i x}+1\right ) \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}}+\frac {{\mathrm e}^{i x} \ln \left ({\mathrm e}^{i x}-1\right )}{a \left ({\mathrm e}^{2 i x}+1\right ) \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}}-\frac {{\mathrm e}^{i x} \ln \left ({\mathrm e}^{i x}+1\right )}{a \left ({\mathrm e}^{2 i x}+1\right ) \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}}\) | \(234\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.55, size = 48, normalized size = 0.91 \begin {gather*} \frac {\cos \left (3 \, x\right ) + 15 \, \cos \left (x\right ) - 6 \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) + 6 \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right )}{12 \, a^{\frac {3}{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 94 vs.
\(2 (41) = 82\).
time = 3.39, size = 94, normalized size = 1.77 \begin {gather*} \frac {3 \, {\left (\tan \left (x\right )^{4} + 2 \, \tan \left (x\right )^{2} + 1\right )} \sqrt {a} \log \left (\frac {a \tan \left (x\right )^{2} - 2 \, \sqrt {a \tan \left (x\right )^{2} + a} \sqrt {a} + 2 \, a}{\tan \left (x\right )^{2}}\right ) + 2 \, \sqrt {a \tan \left (x\right )^{2} + a} {\left (3 \, \tan \left (x\right )^{2} + 4\right )}}{6 \, {\left (a^{2} \tan \left (x\right )^{4} + 2 \, a^{2} \tan \left (x\right )^{2} + a^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot {\left (x \right )}}{\left (a \left (\tan ^{2}{\left (x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 53, normalized size = 1.00 \begin {gather*} \frac {\arctan \left (\frac {\sqrt {a \tan \left (x\right )^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a} a} + \frac {3 \, a \tan \left (x\right )^{2} + 4 \, a}{3 \, {\left (a \tan \left (x\right )^{2} + a\right )}^{\frac {3}{2}} a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.69, size = 46, normalized size = 0.87 \begin {gather*} \frac {\frac {a\,{\mathrm {tan}\left (x\right )}^2+a}{a}+\frac {1}{3}}{{\left (a\,{\mathrm {tan}\left (x\right )}^2+a\right )}^{3/2}}-\frac {\mathrm {atanh}\left (\frac {\sqrt {a\,{\mathrm {tan}\left (x\right )}^2+a}}{\sqrt {a}}\right )}{a^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________